import React, { Component } from 'react'
import { Input } from 'antd'
import { WithStore } from './util'

const { Search } = Input

class Form extends Component {
    submit = (str) => {
        const { add } = this.props;
        add(str);
    }
    render() {
        return (
            <div>
                <h1>toDoList</h1>
                <Search
                    enterButton="添加"
                    size="large"
                    onSearch={this.submit}
                />
            </div>
        )
    }
}

export default WithStore(Form)